package cn.tedu.submarine_2;

import javax.swing.*;

public class MineSubmarine extends SeaObject implements EnemyLife{
    public MineSubmarine() {
        super(63,19);
    }

    @Override
    public void move() {
        x+=speed;
    }

    @Override
    public ImageIcon getImage() {
        return Images.minesubm;
    }

    /**
     * 水雷潜艇发射水雷
     * @return
     */
    public Mine shootMine(){
        return new Mine(this.x+this.width,this.y-11);
    }

    /**
     * 重写方法得命
     * @return
     */
    public int getLife(){
        return 1;
    }
}
